<template>
  <el-dialog :visible.sync="visible"
    custom-class="dialog-contact"
    :modal-append-to-body="true"
    :close-on-click-modal="true"
    @close="onDialogClose"
    :append-to-body="true"
    width="320px">
    <template #title>
      <span class="xz-confirm-title">
        <svg-icon :iconClass="appCfg.logo"/>
        {{appCfg.name}}
      </span>
    </template>
    <div class="content">
      <p>该订单为合作渠道订单，请联系客服为您处理开票</p>
      <img src="@/assets/code-customer-service.png" class="vip-code-img" />
      <div class="bottom-box">
        <svg-icon iconClass="wechat" class="wechat"/>
        <span>微信扫码添加客服</span>
      </div>
    </div>
  </el-dialog>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
  name: 'InvoiceContactDialog',
  props: {
    showContactVisible: {
      type: Boolean,
      default: false
    }
  },
  computed: {
    ...mapGetters(['appCfg']),
    visible: {
      get () {
        return this.showContactVisible
      },
      set (val) {
        this.$emit('update:showContactVisible', val)
      }
    }
  },
  methods: {
    onDialogClose () {
      this.$emit('close')
    }
  }
}
</script>
<style lang="scss" scoped>
/deep/ .dialog-contact {
  position: relative;
  .el-dialog__header {
    padding: 10px 20px 0;
  }
  .el-dialog__body {
    padding: 20px 30px 30px;
    font-size: 12px;
  }
  .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    p {
      font-size: 14px;
    }
    img {
      width: 140px;
      margin: 16px auto 10px;
    }
    .bottom-box {
      display: flex;
      align-items: center;
    }
    .wechat {
      font-size: 20px;
      margin-right: 6px;
      color: #08a74d;
    }
  }
}
</style>
